package com.muyu.danmo.domain;


import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 培训班商品对象 danmo_training_shopping_products
 * 
 * @author kunzong
 * @date 2024-11-28
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DanmoTrainingShoppingProducts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 培训班商品表ID */
    private Long id;

    /** 关联培训班ID */
    @Excel(name = "关联培训班ID")
    private Long trainingInformationId;

    /** 商品标题 */
    @Excel(name = "商品标题")
    private String title;

    /** 商品价格 */
    @Excel(name = "商品价格")
    private BigDecimal price;

    /** 商品详情 */
    @Excel(name = "商品详情")
    private String description;

    /** 库存量 */
    @Excel(name = "库存量")
    private Long stock;

    /** 销量 */
    @Excel(name = "销量")
    private Long sales;

    /** 状态（展示中 已下架 已告罄） */
    @Excel(name = "状态", readConverterExp = "展=示中,已=下架,已=告罄")
    private String state;

    /** 培训班商品轮播图 */
    @Excel(name = "培训班商品轮播图")
    private List<DanmoTrainingShoppingProductsCarousel> danmoTrainingShoppingProductsCarouselList;

    /** 培训班商品图片 */
    @Excel(name = "培训班商品图片")
    private List<DanmoTrainingShoppingProductsPicture> danmoTrainingShoppingProductsPictureList;

    /** 培训班商品规格 */
    @Excel(name = "培训班商品规格")
    private List<DanmoTrainingShoppingPrSp> danmoTrainingShoppingPrSpList;

    private Integer pageNum = 1;
    private Integer pageSize = 10;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("trainingInformationId", getTrainingInformationId())
            .append("title", getTitle())
            .append("price", getPrice())
            .append("description", getDescription())
            .append("stock", getStock())
            .append("sales", getSales())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("state", getState())
            .toString();
    }
}
